package com.kb5173.base.demo.dubbo.spring;

import java.io.IOException;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.kb5173.base.demo.protocal.DemoServiceApi;

public class DubboSpringConsumer {

	public static void main(String[] args) throws IOException {
		
		ApplicationContext ac = new ClassPathXmlApplicationContext("classpath*:META-INF/spring/*.xml");
		
		///annotation invoker
		DemoAnnotationAction daa = (DemoAnnotationAction) ac.getBean("demoAnnotationAction");
		daa.cosumer();
		
		//spring xml invoker
		DemoServiceApi dx = (DemoServiceApi) ac.getBean("springImpl");
		System.out.println("spring xml invoker result........."+dx.demoServiceApi());
		
		System.in.read();
	}
}
